package reflect.entity;

import java.io.IOException;
import java.io.Serializable;

/**
 * @version 1.0
 * @author:罗苏琴
 * @Date 2024/12/2 下午1:51
 * 子类
 */
public class Person extends BaseClass implements Serializable {
 //成员变量
 private String name;
 private final int age=30;//年龄
 protected String address;//地址
 public String getName;
 //成员方法


 public Person() {
 }

 public Person(String name) {
  this.name = name;
 }

 public Person(String address, String name, String getName) {
  this.address = address;
  this.name = name;
  this.getName = getName;
 }
 private void silentMethod() throws IOException,NullPointerException{
  System.out.println("这是悄悄话");
 }
 public String getName() {
  return name;
 }

 public void setName(String name) {
  this.name = name;
 }

 public int getAge() {
  return age;
 }

 public String getAddress() {
  return address;
 }

 public void setAddress(String address) {
  this.address = address;
 }

 public String getGetName() {
  return getName;
 }

 public void setGetName(String getName) {
  this.getName = getName;
 }



 @Override
 public String toString() {
  return "Person{" +
          "name='" + name + '\'' +
          ", age=" + age +
          ", address='" + address + '\'' +
          ", getName='" + getName + '\'' +
          '}';
 }
}
